const Koa = require('koa');
const path=require('path');
const app = new Koa();
// 连接数据库
require('./utils/connect')
app.use(require('koa-static')(path.resolve(__dirname,'public')))

app.use(require('koa-body')({multipart: true}))
// const router=require('./router')
// 把所以的restful api 放在中间件上
// 静态资源服务：想客服端提供html,css



app.use(require('./router/webapp').routes())
// vue element restful api
app.use(require('./router/element-admin').routes())
app.use(require('./router/antd').routes())
// app.use(require('./router/weapp').routes())



app.listen(9999,()=>console.log('hello'));